1. What is the primary purpose of programming?
Correct Answer: (B) To convert problems into executable software
2. Which of the following is a fundamental concept in computer programming?
Correct Answer: (A) Data
3. What are the two essential elements of a computer program?
Correct Answer: (B) Sequence of instructions and computer programming language
4. Who is regarded as the first computer programmer?
Correct Answer: (B) Ada Augusta Lovelace
5. What is machine language primarily composed of?
Correct Answer: (B) Binary codes (0s and 1s)
6. Which programming language was developed for business applications?
Correct Answer: (C) COBOL
7. Which of the following keywords are used in a switch statement in C programming?
Correct Answer: (B) switch, case, default, break
8. What does the operand section of a machine language instruction specify?
Correct Answer: (B) The data to be used for the operation
9. What is a significant disadvantage of first-generation programming languages?
Correct Answer: (C) They are difficult to maintain
10. Which programming language is known for its use in scientific and numerical analysis?
Correct Answer: (B) FORTRAN
11. What does a compiler do?
Correct Answer: (B) Translates high-level code to machine language
12. What type of programming language is Python?
Correct Answer: (B) High-level language
13. Which of the following is an example of a high-level programming language?
Correct Answer: (A) C
14. What is the main advantage of using a high-level programming language?
Correct Answer: (B) It is easier for humans to read and write
15. Which of the following is NOT a characteristic of procedural programming?
Correct Answer: (B) Focus on data
16. What is the purpose of an Integrated Development Environment (IDE)?
Correct Answer: (B) To facilitate software development with tools
17. What is an algorithm?
Correct Answer: (B) A set of instructions for solving a problem
18. What is the significance of the 'break' statement in a switch case?
Correct Answer: (C) It exits the switch statement
19. Which of the following is an example of a structured programming language?
Correct Answer: (B) Java
20. What does a debugger do?
Correct Answer: (B) Analyzes and fixes code errors
21. Which generation of programming languages includes assembly languages?
Correct Answer: (B) Second Generation
22. What software is used to translate assembly language programs into machine language?
Correct Answer: (C) Assembler
23. Which of the following is a benefit of second-generation programming languages?
Correct Answer: (B) They are easier to create and understand than first-generation languages.
24. Which of the following is a drawback of second-generation programming languages?
Correct Answer: (B) They execute more slowly than machine languages.
25. Which programming paradigm is primarily used by third-generation programming languages?
Correct Answer: (C) Procedural Programming
26. Which of the following programming languages is considered a third-generation language?
Correct Answer: (B) COBOL
27. What is a key characteristic of third-generation programming languages?
Correct Answer: (C) They are machine-independent.
28. Which of the following is a benefit of third-generation programming languages?
Correct Answer: (B) They make it easier to maintain programs.
29. Which statement accurately describes compilers?
Correct Answer: (B) They translate the entire program into machine language before execution.
30. Which programming languages are categorized as fourth-generation languages?
Correct Answer: (C) SQL, PowerBuilder, XBase++
31. What is the primary purpose of fourth-generation programming languages (4GLs)?
Correct Answer: (B) To minimize the cost and time of software development.
32. Which characteristic is essential for fourth-generation programming languages?
Correct Answer: (B) They implement database management systems (DBMS).
33. Which of the following programming languages is associated with the fifth generation of programming languages?
Correct Answer: (C) Prolog.
34. What is a primary focus of fifth-generation programming languages?
Correct Answer: (B) Artificial Intelligence and Neural Networks.
35. Which of the following is a characteristic of a good programming language?
Correct Answer: (B) It must allow programmers to focus on design without extensive background knowledge.
36. What should a programming language's function library include?
Correct Answer: (C) Detailed documentation.
37. Which characteristic improves the efficiency of programs written in a good programming language?
Correct Answer: (C) Efficient use of memory and computer resources.
38. Why are fifth-generation programming languages user-friendly?
Correct Answer: (B) They utilize everyday English vocabulary for communication.
39. Which programming languages fall under the fifth generation?
Correct Answer: (B) Prolog, Lisp.
40. Which programming paradigm is commonly used in fifth-generation languages?
Correct Answer: (C) Logic-based.
41. Who developed the C programming language?
Correct Answer: (B) Dennis Ritchie
42. What was the primary purpose of creating the C programming language?
Correct Answer: (C) System programming and UNIX development
43. C++ was originally known as:
Correct Answer: (B) C with Classes
44. Who developed C++?
Correct Answer: (C) Bjarne Stroustrup
45. In which year was C++ officially renamed from 'C with Classes'?
Correct Answer: (B) 1983
46. What does the '++' in C++ signify?
Correct Answer: (C) Increment operator, symbolizing an improvement over C
47. Which of the following was NOT a feature introduced in early C++?
Correct Answer: (C) Threads
48. Which book introduced C++ as a commercial product in 1985?
Correct Answer: (C) The C++ Programming Language
49. The first international standard for C++ was released in:
Correct Answer: (B) 1998
50. Which C++ standard included the Standard Template Library (STL)?
Correct Answer: (A) C++98
51. Which programming paradigm does C++ support?
Correct Answer: (C) Both object-oriented and procedural programming
52. Which language influenced the object-oriented features of C++?
Correct Answer: (A) Simula
53. What was the name of the first C++ compiler?
Correct Answer: (C) Cfront
54. C++ is considered a:
Correct Answer: (C) Middle-level language
55. Which of the following was NOT a feature of C++11?
Correct Answer: (D) Garbage collection
56. What is the most recent C++ standard as of 2023?
Correct Answer: (D) C++23
57. What is the primary difference between C and C++?
Correct Answer: (A) C++ supports object-oriented programming, while C does not
58. The first object-oriented language that influenced C++ was:
Correct Answer: (C) Simula
59. Which feature allows C++ to support multiple inheritances?
Correct Answer: (D) Inheritance from multiple base classes
60. What is an algorithm in computer science?
Correct Answer: (B) A sequence of instructions to solve a problem.
61. What programming paradigm does C++ support?
Correct Answer: (C) Both structured and object-oriented programming.
62. Which feature of object-oriented programming promotes reusability?
Correct Answer: (B) Inheritance.
63. What is a variable in programming?
Correct Answer: (B) A memory location with a name for storing data.
64. What does a variable’s type indicate?
Correct Answer: (B) The kind of data it can hold.
65. Which of the following is an example of an object-oriented programming language?
Correct Answer: (D) JAVA.
66. In object-oriented programming, what is a method?
Correct Answer: (D) A set of operations detailing how an object responds to a message.
67. What is the principle of information hiding in OOP?
Correct Answer: (B) The sender of a message does not know how the receiver will fulfill the request.
68. What is procedural programming based on?
Correct Answer: (B) Calling procedures.
69. Which programming language is an example of a procedural language?
Correct Answer: (D) COBOL.
70. In OOP, what is an object?
Correct Answer: (C) A module containing data and methods.
71. What is the key difference between procedural programming and object-oriented programming?
Correct Answer: (C) Procedural programming is based on procedures, OOP is based on objects.
72. Which of the following is a feature of object-oriented programming?
Correct Answer: (C) Information hiding.
73. What type of interaction occurs in object-oriented programming?
Correct Answer: (C) Message passing between objects.
74. What is a module in software engineering?
Correct Answer: (B) A reusable program component.
75. What is the main focus of Procedure-Oriented Programming (POP)?
Correct Answer: (B) Functions and procedures.
76. In Object-Oriented Programming (OOP), what is data encapsulation used for?
Correct Answer: (A) To hide data from direct access.
77. Which of the following is a characteristic of Object-Oriented Programming (OOP)?
Correct Answer: (C) Objects contain both data and methods.
78. In POP, how is data generally handled?
Correct Answer: (C) Data is shared among multiple functions.
79. Which programming paradigm allows for inheritance?
Correct Answer: (B) Object-Oriented Programming.
80. What is the primary advantage of OOP over POP in terms of code maintenance?
Correct Answer: (C) Code is more modular and reusable.
81. Which of the following is NOT supported by Procedure-Oriented Programming (POP)?
Correct Answer: (D) Both A and B.
82. In which programming paradigm do objects communicate through methods?
Correct Answer: (B) Object-Oriented Programming.
83. Which of the following best describes inheritance in OOP?
Correct Answer: (C) Creating new classes based on existing ones.
84. Which of the following is a benefit of using OOP over POP?
Correct Answer: (B) Easier reusability and scalability of the code.
85. In OOP, what is polymorphism used for?
Correct Answer: (B) Operating different objects using the same method or function.
86. Which of the following is a valid example of object-oriented programming?
Correct Answer: (C) Defining classes and objects.
87. Which of the following terms is associated with Object-Oriented Programming (OOP)?
Correct Answer: (A) Encapsulation.
88. Which language is primarily associated with Procedure-Oriented Programming?
Correct Answer: (D) C.
89. What is the main drawback of Procedure-Oriented Programming (POP) when compared to Object-Oriented Programming (OOP)?
Correct Answer: (A) Lack of modularity.
90. Which of the following is not an object in Object-Oriented Programming?
Correct Answer: (B) Function.
91. How does OOP improve reusability compared to POP?
Correct Answer: (B) By allowing inheritance of classes.
92. In which of the following programming paradigms are functions the primary method of execution?
Correct Answer: (B) Procedure-Oriented Programming.
93. What is the relationship between classes and objects in Object-Oriented Programming?
Correct Answer: (A) Objects are instances of classes.
94. In which of the following programming paradigms is data encapsulation used?
Correct Answer: (B) Object-Oriented Programming.
95. Which of the following is a commercial programming language designed to handle business-related issues?
Correct Answer: (B) COBOL.
96. What type of programming language is FORTRAN primarily categorized as?
Correct Answer: (B) Scientific language.
97. SQL is an example of which category of programming languages?
Correct Answer: (C) Special-purpose language.
98. Which of the following is a general-purpose programming language?
Correct Answer: (B) C.
99. Procedure-oriented languages focus more on which aspect?
Correct Answer: (B) Procedures.
100. Prologue is an example of which type of programming language?
Correct Answer: (B) Logic-oriented language.
101. Object-oriented programming languages emphasize which of the following?
Correct Answer: (C) Objects.
102. Machine language is primarily composed of what?
Correct Answer: (B) Numeric codes.
103. Which programming language was designed for educational purposes and is known for its simplicity?
Correct Answer: (A) BASIC.
104. What does the acronym SQL stand for?
Correct Answer: (A) Structured Query Language.
105. The language used for scientific computations that introduced control structures is known as:
Correct Answer: (C) FORTRAN.
106. What feature is introduced in ALGOL that helps in program construction?
Correct Answer: (B) Recursive subprograms.
107. Which of the following languages is NOT a high-level programming language?
Correct Answer: (C) Assembly.
108. What was the main goal of the development of BASIC?
Correct Answer: (B) To simplify programming for beginners.
109. Which programming paradigm does C++ primarily utilize?
Correct Answer: (C) Object-oriented.
110. Which of the following is a feature of object-oriented programming?
Correct Answer: (B) Information hiding.
111. What programming language introduced the concept of information hiding?
Correct Answer: (B) Simula.
112. Which of the following languages was developed by Bjarne Stroustrup?
Correct Answer: (C) C++.
113. C# was conceived by which of the following individuals?
Correct Answer: (B) Anders Hejlsberg.
114. Which programming language is primarily used in AI-related applications?
Correct Answer: (C) Prolog.
115. Which programming language was designed for the World Wide Web?
Correct Answer: (B) Java.
116. What is the main purpose of Python as a programming language?
Correct Answer: (C) Simplicity and readability.
117. Which of the following is a characteristic of declarative languages?
Correct Answer: (B) They specify "what" needs to be done.
118. Which language is an example of a logic programming language?
Correct Answer: (B) Prolog.
119. Which programming language is used for document formatting?
Correct Answer: (C) TeX.
120. Which of the following is a widely used page-description language?
Correct Answer: (C) PostScript.
121. What does XML stand for?
Correct Answer: (A) Extensible Markup Language.
122. Which factor is NOT mentioned as affecting the choice of a programming language?
Correct Answer: (C) Language popularity.
123. Which of the following languages is an example of a functional programming language?
Correct Answer: (C) LISP.
124. What is one of the main purposes of using a scripting language?
Correct Answer: (B) To address small programming tasks.
125. What does IDE stand for?
Correct Answer: (A) Integrated Development Environment.
126. What programming language is known for its flexibility in expressing common operations?
Correct Answer: (C) Perl.
127. Which programming language is used to develop web applications?
Correct Answer: (C) JavaScript.
128. Which language is often used in conjunction with HTML for web scripting?
Correct Answer: (C) JavaScript.
129. Which of the following programming languages was initially created for the U.S. Department of Defense?
Correct Answer: (C) Ada.
130. What type of language is SQL?
Correct Answer: (B) Declarative.
131. Which of the following is an application of Python?
Correct Answer: (D) All of the above.
132. What is a computer program?
Correct Answer: (A) A set of instructions written in a programming language.
133. What is the goal of programming?
Correct Answer: (B) To swiftly and precisely solve issues.
134. What does the law of equifinality state?
Correct Answer: (B) Multiple approaches can lead to the same outcome.
135. Which of the following is an example of problem-solving?
Correct Answer: (D) All of the above.
136. What are the two categories of flowcharts?
Correct Answer: (A) Program flowcharts and system flowcharts.
137. What is a flowchart primarily used for?
Correct Answer: (A) To illustrate complex programming logic.
138. Which guideline should be followed when making program flowcharts?
Correct Answer: (C) Each symbol should have only one input point and one departure point.
140. Which of the following best describes the use of algorithms?
Correct Answer: (B) They simplify complex problems into manageable parts.
141. What is a common use case for algorithms in computing?
Correct Answer: (C) Sorting lists of data.
142. Why are algorithms important in programming?
Correct Answer: (B) They provide a systematic approach to problem-solving.
143. Which of the following is NOT a method of expressing algorithms?
Correct Answer: (D) Graphical user interface.
144. What do flow lines in a flowchart indicate?
Correct Answer: (B) The order of operations.
145. Which symbol in a flowchart typically represents a decision point?
Correct Answer: (C) Diamond.
146. What is the advantage of using flowcharts?
Correct Answer: (B) They simplify programming logic.
147. How are algorithms beneficial in terms of efficiency?
Correct Answer: (B) They provide numerous ways to solve one problem.
148. What is the primary purpose of a flowchart?
Correct Answer: (B) To visually represent an algorithm or process.
149. Which of the following elements is NOT typically used in a flowchart?
Correct Answer: (D) Audio cues.
150. What do the arrows in a flowchart signify?
Correct Answer: (B) The flow direction of the process.
151. How can flowcharts be compared to blueprints?
Correct Answer: (B) Both are used before starting a project.
152. In which stage of a project are flowcharts most valuable?
Correct Answer: (C) Initial stages of project planning.
153. What is one benefit of using flowcharts in communication?
Correct Answer: (B) They simplify the explanation of processes.
154. When can flowcharts help identify areas for improvement?
Correct Answer: (B) When existing processes are convoluted.
155. What does a flowchart help establish in terms of process boundaries?
Correct Answer: (C) The starting and ending points of the process.
156. How do flowcharts facilitate team communication?
Correct Answer: (B) They provide a shared visual representation.
157. In the cooking rice example, which step is conditional?
Correct Answer: (C) IF WATER LEVEL = 1 INCH ABOVE THE RICE.
158. What type of structure do flowcharts primarily represent?
Correct Answer: (B) Sequence logic structures.
159. What do flowcharts help identify in problem-solving scenarios?
Correct Answer: (B) The potential causes of issues.
160. Which of the following is NOT a recommended use for flowcharts?
Correct Answer: (B) Complicating project planning.
161. What does the algorithm for obtaining the sum of two numbers involve?
Correct Answer: (C) Adding the two numbers together.
162. Which of the following is a key advantage of using flowcharts in C++ programming?
Correct Answer: (B) Visual clarity in representing logic.
163. Flowcharts are commonly used in programming to:
Correct Answer: (B) Visually depict the logic of the program.
164. What is a major limitation of flowcharts in C++ programming?
Correct Answer: (C) They may become difficult to interpret in large programs.
165. Flowcharts are most useful for which type of programmers?
Correct Answer: (B) Novice programmers.
166. Which of the following is NOT an advantage of flowcharts?
Correct Answer: (C) Automatically updates with program changes.
167. What is one of the limitations of flowcharts in representing C++ code?
Correct Answer: (C) They might not show detailed code structures like pointers.
168. In which situation is a flowchart particularly helpful?
Correct Answer: (B) In detecting logical errors early.
169. One of the primary uses of flowcharts is:
Correct Answer: (B) Visualising the logic of complex programs.
170. Flowcharts in C++ programming are used for:
Correct Answer: (B) Debugging and error identification
171. What is one advantage of using flowcharts for program documentation?
Correct Answer: (C) They provide a visual representation of logic for future reference
172. How do flowcharts aid in communication within the programming realm?
Correct Answer: (B) By providing visual clarity of program logic
173. What is a limitation of flowcharts when program logic changes?
Correct Answer: (B) Synchronising the flowchart with the updated logic can be difficult
174. Flowcharts may not be able to represent all aspects of which programming feature?
Correct Answer: (C) Object-oriented features such as classes and objects
175. Why can flowcharts be time-consuming to create?
Correct Answer: (B) They involve representing all the complex logic visually
176. What aspect of C++ programming may not be effectively represented in flowcharts?
Correct Answer: (B) Object-oriented features and pointers
177. What is one reason flowcharts are useful in project documentation?
Correct Answer: (C) They serve as visual references of the program's logic
178. In flowcharts, the diamond shape is used to represent:
Correct Answer: (B) Decision points
179. Which shape in flowcharts represents processes or actions?
Correct Answer: (B) Oval
180. What do arrows in flowcharts signify?
Correct Answer: (C) The flow of control
181. What standardisation benefit do flowcharts provide?
Correct Answer: (B) They follow universal symbols that are understood by all developers
182. In which scenario might a flowchart become difficult to manage?
Correct Answer: (A) For very large and complex C++ programs
183. Flowcharts are static, meaning they cannot:
Correct Answer: (B) Display dynamic changes in the program's execution
184. Which of the following is true about flowcharts in C++?
Correct Answer: (C) They visually represent the program’s structure but may omit detailed syntax
185. Flowcharts may lead to misinterpretation if:
Correct Answer: (B) They are not designed with clarity
186. How do flowcharts help in error identification?
Correct Answer: (B) They visually depict the logic flow, helping to identify errors early
187. What is the primary purpose of pseudocode?
Correct Answer: (B) To represent algorithms in a human-readable format
188. Which of the following is a key characteristic of pseudocode?
Correct Answer: (C) It uses plain English to describe algorithms
189. What makes pseudocode different from real programming code?
Correct Answer: (C) Pseudocode is a simplified representation, focusing on human understanding
190. Which of the following is an advantage of pseudocode?
Correct Answer: (A) It helps in understanding the logic without worrying about syntax
191. What is the role of pseudocode in algorithm development?
Correct Answer: (B) To provide an outline of the algorithm before writing actual code
192. Which of the following statements about pseudocode is true?
Correct Answer: (B) It does not require a strict syntax
193. In the context of algorithm representation, pseudocode is best described as:
Correct Answer: (C) An informal way to describe an algorithm
194. Which of the following is an example of pseudocode?
Correct Answer: (B) If x is greater than 0, return true
195. What is a disadvantage of pseudocode?
Correct Answer: (A) It cannot be executed by a computer
196. When writing pseudocode, which of the following is typically not necessary?
Correct Answer: (B) Precise syntax
197. What is the primary purpose of control structures in programming?
Correct Answer: (B) To manage the sequence of statement execution
198. How does sequential control operate in a program?
Correct Answer: (B) It executes statements in a predetermined sequence
199. What is an example of a situation where sequential control is essential?
Correct Answer: (B) When obtaining data from the user before processing it
200. What type of control structure allows for the selective execution of statements?
Correct Answer: (B) Selection control
201. In programming, what does the term "default mode" refer to?
Correct Answer: (B) Sequential control
202. What is the flow of execution in sequential programming?
Correct Answer: (B) One statement follows another in order
203. Why is the order of statements significant in programming?
Correct Answer: (B) It determines the correctness of program execution
204. What must be considered when designing a program to solve real-world problems?
Correct Answer: (B) The conditions that dictate the flow of execution
205. Which of the following statements about sequential control is true?
Correct Answer: (B) It is the simplest form of program control
206. What is an example of a condition that might require selection control?
Correct Answer: (B) Turning off lights after a certain time
207. What is the primary purpose of selection control in programming?
Correct Answer: (C) To make decisions about program data and execute statements conditionally
208. What happens if a division by zero occurs in a program?
Correct Answer: (D) It produces a run-time error
209. In a selection control statement, how are decisions typically stated?
Correct Answer: (A) As yes/no questions
210. What does the diamond shape represent in a flowchart?
Correct Answer: (B) A decision point
211. If the answer to a decision in a selection control statement is "yes," what happens?
Correct Answer: (C) The left branch of control is taken
212. Which of the following is true about the paths in a selection control statement?
Correct Answer: (C) Both paths can be empty, but not both can be empty simultaneously
213. What would be an inappropriate use of a selection control statement?
Correct Answer: (A) To have both paths execute the same statements
214. What is a possible execution scenario of a selection control statement?
Correct Answer: (A) Either one of the two paths can be executed, but not both
215. In the context of selection logic, what is a "condition"?
Correct Answer: (C) A specific state of program data that determines the flow of execution
216. What should happen based on the decision in a selection control statement?
Correct Answer: (A) The next statement executed should depend on the condition's outcome
217. What does a loop control statement allow you to do?
Correct Answer: (C) To repeat one or more statements until a condition becomes true
218. Which symbols represent a loop in RAPTOR?
Correct Answer: (A) An ellipse and a diamond
219. What happens if the decision expression in a loop evaluates to "no"?
Correct Answer: (A) Control passes back to the loop statement for repetition
220. How many times is Statement 2 executed in the loop?
Correct Answer: (B) At least once before the decision statement
221. What happens when a loop creates an infinite loop?
Correct Answer: (B) The loop never stops repeating until manually stopped
222. What must happen to avoid creating an infinite loop?
Correct Answer: (B) One or more statements in the loop must change the decision variable
223. In nested loops, what can occur within a loop statement?
Correct Answer: (B) Another loop statement
224. What is the role of the decision statement in a loop?
Correct Answer: (B) To determine whether the loop continues or stops
225. If Statement 2 in a loop is removed, what effect does it have?
Correct Answer: (A) The loop will still function correctly but will start with the decision statement
226. What guarantees the execution of Statement 2 in a loop?
Correct Answer: (A) It comes before the decision statement
227. What happens to the program if the decision statement never evaluates to "yes"?
Correct Answer: (B) An infinite loop occurs
228. Which type of loop executes at least once regardless of the condition?
Correct Answer: (A) Do-While loop
229. In a loop, what is the purpose of modifying the variables in the decision statement?
Correct Answer: (B) To ensure the loop eventually terminates
230. What type of control structure is used for iteration?
Correct Answer: (A) Loop control
231. How is a loop terminated in RAPTOR?
Correct Answer: (B) When the decision expression evaluates to "yes"
232. What is the primary purpose of control structures in programming?
Correct Answer: (B) To change how a program is executed
233. Which of the following is NOT a type of control structure?
Correct Answer: (D) Data structure
234. What is one of the benefits of using control structures?
Correct Answer: (B) Enhances code organization
235. What can excessive nesting of control structures lead to?
Correct Answer: (C) Readability problems
236. What is an example of a looping control structure?
Correct Answer: (B) for loop
237. Which control structure allows for error handling in programs?
Correct Answer: (D) try-catch blocks
238. What occurs if a decision statement in a loop never evaluates to "yes"?
Correct Answer: (B) An infinite loop occurs
239. Which characteristic is essential for a good program?
Correct Answer: (C) Well-structured
240. What can poorly designed control structures lead to in a program?
Correct Answer: (C) Debugging challenges
241. What is one disadvantage of using control structures?
Correct Answer: (B) They may introduce logical errors
242. Which of the following is NOT a benefit of using control structures?
Correct Answer: (B) Increased complexity
243. How do control structures affect program efficiency?
Correct Answer: (B) They can increase efficiency by preventing unnecessary calculations
244. What is one of the drawbacks of using excessive control structures?
Correct Answer: (C) Code duplication
245. What type of control structure is typically used to repeat a block of code?
Correct Answer: (B) Loop
246. What effect does poor use of control structures have on maintainability?
Correct Answer: (C) Leads to maintenance difficulties
247. What does the term "modularity" refer to in programming?
Correct Answer: (B) Breaking complex problems into smaller components
248. What is the consequence of an infinite loop in a program?
Correct Answer: (B) The program will never stop unless manually stopped
249. Which programming paradigm emphasizes the use of control structures like loops and conditionals?
Correct Answer: (C) Procedural programming